Code
console.log("Hello World");
// Variable declarations
let country;
let name = "XYZ";
let age = 21;
const gender = "male";
/*
- Variable should not start with a number
- Should start with a letter or underscore
- Should not contain special characters or spaces
- Can contain letters, numbers, and underscores
- Case sensitive
- CamelCase is recommended
*/
let firstName = "XYZ";
console.log(name, age, gender, country);
age = 22;
country = "India";
console.log(name, age, gender, country);
// Primitive data types: number, string, boolean, null, undefined
let num = null;
// Non-primitive data types: array, object, function, date, promise
Console